function saveOrUpdate(id, fristHalfUrl, data) {
    var url;
    if(id == ""){
        url = fristHalfUrl + "/add/save";
    }else{
        url = fristHalfUrl + "/edit/save";
    }
    $ajax({
        url: url,
        data :  data.field,
        succCallback: function (json) {
            if(json.code == 0){
                parent.reload();
                closed();
                parent.layer.msg(json.msg);
            }
        }
    });
    return false;
}

function closed(){
    parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭弹出的子页面窗口
}